export default class Queue{
    queue = {}
    next(){
        const keys = Object.keys(this.queue)
        delete this.queue[keys[0]]
        console.log(this.queue,'刚删除')
        if(Object.keys(this.queue).length > 0){
            console.log('进入啦')
            this.queue[keys[1]] = true
        }
        console.log(this.queue, 'queue删除')
    }
    register(key){
        this.queue[key] = !Object.keys(this.queue).length
        console.log(this.queue, 'queuequeuequeue')
    }
}